package no.ntnu.fp.gui;

import javax.swing.JPanel;
import javax.swing.JLabel;
import java.awt.Font;
import javax.swing.JTextPane;
import javax.swing.border.EtchedBorder;

import no.ntnu.fp.model.Appointment;

import java.awt.Color;

public class AppointmentCell extends JPanel {

	private Appointment model;

	/**
	 * Create the panel.
	 */
	public AppointmentCell(Appointment model) {
		this.model = model;
		setBackground(new Color(153, 204, 204));
		setBorder(new EtchedBorder(EtchedBorder.LOWERED, null, null));
		setLayout(null);

		JLabel lblTitle = new JLabel(model.getTitle());
		lblTitle.setFont(new Font("Tahoma", Font.BOLD, 11));
		lblTitle.setBounds(10, 11, 126, 14);
		add(lblTitle);

		JTextPane txtpnDescription = new JTextPane();
		txtpnDescription.setText(model.getDescription());
		txtpnDescription.setBounds(10, 30, 126, 53);
		add(txtpnDescription);

	}
}
